package cn.com.wangluotongxin.mall.controller;

import cn.com.wangluotongxin.common.web.AjaxResult;
import cn.com.wangluotongxin.mall.service.IMallGoodsInfoService;
import cn.com.wangluotongxin.mall.vo.GoodsInfoVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 网络通信-商城APP-商品信息 前端控制器
 * </p>
 *
 * @author AutoGenerator
 * @since 2024-11-05
 */
@Api(tags = "网络通信-商城APP-商品信息 相关接口")
@RestController
@RequestMapping("/goods/info")
public class MallGoodsInfoController {

    @Autowired
    private IMallGoodsInfoService goodsInfoService;

    @ApiOperation("商品详情信息")
    @GetMapping("/detail/{id}")
    public AjaxResult<GoodsInfoVo> detail(@PathVariable("id") Integer id) {
        return AjaxResult.success(goodsInfoService.detail(id));
    }
}